import { useRef } from "react";
import { MessageProvider, MessageRef } from "./index";
import { useMessage } from "./useMessage";
import { ConfigProvider } from "./ConfigProvider";

function TestMessage() {

    return (
        <ConfigProvider>
            <div>
                <Aaa></Aaa>
            </div>
        </ConfigProvider>
    );
}

function Aaa() {
    const message = useMessage()
    return <button onClick={() => {
        message.add({
            content: '请求成功'
        })
    }}>成功</button>
}

export default TestMessage;

